home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / sticpsrc.lzh / SOURCE.ARC / TNC2VEC.ASM < prev    next >
Assembly Source File  |  1989-08-09  |  709b  |  45 lines

  1.     name    tnc2vec
  2.     include pmacros.h
  3.  
  4.     extproc    int14
  5.  
  6. ; tnc2vec - TNC2 emulator INT14 handler
  7.     pubproc    tnc2vec
  8.  
  9.     sti
  10.     ; save regs, making them available to int14()
  11.     push    es
  12.     push    ds
  13.     push    ax
  14.     push    bx
  15.     push    cx
  16.     push    dx
  17.     push    di
  18.  
  19.     getds
  20.     mov    ds,ax
  21.     ifndef    LARGEDATA
  22.     mov    es,ax
  23.     endif
  24.  
  25.     call    int14@
  26.  
  27.     test    ax,ax        ; test if we handled the INT14
  28.     pop    di
  29.     pop    dx
  30.     pop    cx
  31.     pop    bx
  32.     pop    ax
  33.     pop    ds
  34.     pop    es
  35.     jnz    do_iret     ; yes, we can IRET back to caller
  36.                 ; if no, far-jump to the original handler
  37.     db    0eah        ; opcode for a far jump
  38.     pubvar    tnc2ovec,<dw 0,0ffffh>    ; original INT14 handler address
  39.                     ; is stored here by initialization code
  40. do_iret:
  41.     iret
  42.     pend    tnc2vec
  43.  
  44.     end
  45.